<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="/Public/css/pintuer.css">
<link rel="stylesheet" href="/Public/css/admin.css">
<script src="/Public/js/jquery.js"></script>
<script src="/Public/js/pintuer.js"></script>


</head>
<body>
<form method="post" action="" id="listform">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 新进商家列表</strong> </div>
    <table class="table table-hover text-center">
      <tr>
        <th width="100" style="text-align:left; padding-left:20px;">商家名称</th>
        <th width="5%">联系人</th>
        <th width="5%">注册电话</th>
		<th width="5%">上级</th>
        <th width="5%">所在地区</th>
        <th width="10%">详细地址</th>
        <th width="10%">店铺类型</th>
        <th width="10%">店铺简介</th>
        <th width="10%">店铺图片1</th>
        <th width="10%">店铺图片2</th>
        <th width="310">操作</th>
      </tr>
      <?php if(is_array($list)): $k = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><tr>
		        <td style="text-align:left; padding-left:20px;">
		          	<?php echo ($vo["name"]); ?>
		        </td>
		        <td><?php echo ($vo["contacts"]); ?>
		        </td>
		        <td width="10%">
		          	<font color="#00CC99"><?php echo ($vo["phone"]); ?></font>
		        </td>
				<td>
					<?php
 if(!$vo['pid']){ echo '无'; }elseif($vo['is_user']){ $mysql_server_name='127.0.0.1'; $mysql_username='root'; $mysql_password='root'; $mysql_database='cdzx'; $conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password) or die("数据库链接错误") ; mysql_query("set names 'utf8'"); mysql_select_db($mysql_database); $sql ="select * from user where user_Id = ".$vo['pid']; $result = mysql_query($sql,$conn); $row = mysql_fetch_array($result); echo $row['name']; }else{ $mysql_server_name='127.0.0.1'; $mysql_username='root'; $mysql_password='root'; $mysql_database='cdzx'; $conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password) or die("数据库链接错误") ; mysql_query("set names 'utf8'"); mysql_select_db($mysql_database); $sql1 ="select * from shop where shop_id = ".$vo['pid']; $result1 = mysql_query($sql1,$conn); $row1 = mysql_fetch_array($result1); echo $row1['contacts']; } ?>
				</td>
		        <td><?php echo ($vo["area"]); ?></td>
		        <td><?php echo ($vo["address"]); ?></td>
		        <td><?php echo ($vo["type"]); ?></td>
		        <td><?php echo ($vo["synopsis"]); ?></td>
		        <td><p class="example"><img src="/Public/Uploads/<?php echo ($vo["photo1"]); ?>" alt="" width="70" height="50" /></p></td>
		        <td><p class="example"><img src="/Public/Uploads/<?php echo ($vo["photo2"]); ?>" alt="" width="70" height="50" /></p></td>
		        <td>
			        <div class="button-group"> 
			          	<a class="button border-main" href="/index.php/Home/Index/via/id/<?php echo ($vo["shop_id"]); ?>"><span class="icon-edit"></span>通过</a> 
			          	<a class="button border-red" href="/index.php/Home/Index/noVia/id/<?php echo ($vo["shop_id"]); ?>"><span class="icon-edit"></span> 不通过</a> 
			        </div>
		          </td>
	        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
         
      <tr>
        <td colspan="8"><div class="pagelist"> <?php echo ($page); ?> </div></td>
      </tr>
    </table>
  </div>
</form>
</body>

</html>